import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        //求一个整数，在内存当中存储时，二进制1的个数。
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int count = 0;
        int i = 0;
        for (i = 0; i < 32 ;i++){
            if ((n >> i & 1) == 1){
                count++;
            }
        }
        System.out.println(count);
    }
}
